Field of the Invention
The present invention relates to an information processing apparatus, a control method for the information processing apparatus, and a storage medium, especially relates to an information processing apparatus that performs wireless communication directly with a mobile terminal, a control method for the information processing apparatus, and a storage medium.
Description of the Related Art
Regarding information processing apparatuses such as a multifunctional machine, a printer, and the like, more of them have provided with a wireless LAN function. Those information processing apparatuses receive print data from an external device such as a personal computer or a mobile terminal via an access point and execute a printing process based on the received print data.
Further, some of those information processing apparatuses perform wireless communication directly with the external device without the access point. For example, Japanese Laid-Open Patent Application (Kokai) No. 2013-205982 discloses an information processing apparatus that performs wireless communication directly with a mobile terminal using Wi-Fi Direct.
In this manner, when wireless communication is directly performed, it is common to restrict the number of connectable terminals. This is because, when connections are unlimitedly allowed, a problem such as an insufficient memory or reduced performance of the information processing apparatus may occur. In order to prevent an occurrence of such a problem, it is known that by defining a maximum connection device number of external devices as a predetermined value, and some information processing apparatuses control not to connect with external devices more than the maximum connection device number (for example, see Laid-Open Patent Application (Kokai) No. 2003-101551).
When an information processing apparatus performs Wi-Fi Direct communication with a mobile terminal, conventionally, the connection is established in a sequence illustrated in FIG. 7.
Firstly, a user performs a wireless connection preparation operation to manually input an SSID and a KEY with a mobile terminal 710 and execute a handover operation with an NFC touch (step S701). With such an operation, the mobile terminal 710 establishes a connection in a wireless link layer level by sending a connection request to an information processing apparatus 700 (steps S702 and S703). Next, by sending an Internet Protocol (IP) address request to the information processing apparatus 700, the mobile terminal 710 establishes a connection in an IP layer level so that a printing process becomes available when an IP address is distributed from the information processing apparatus 700 (steps S704 and S705).
However, there is a case that the number of the external devices connected to the information processing apparatus 700 has reached the maximum connection device number. In such a case, when a connection request is received from the mobile terminal 710 in step S702, the information processing apparatus 700 transmits, to the mobile terminal 710, a connection result indicating that the connection in the wireless link layer level is refused in response to the connection request (step S703).
When the mobile terminal 710 retries the connection to the information processing apparatus 700 after the connection result is transmitted, user's trouble becomes complicated since the wireless connection preparation operation such as the manual input or handover operation in step S701 has to be started over.
Further, since the user does not know when a spot of the maximum connection number of the information processing apparatus 700 opens up (whether it becomes in a vacant spot available condition), the user has to irregularly retry the wireless connection preparation operation of step S701. Further, there has been a problem that, as a result of the retry of the wireless connection preparation operation, when the information processing apparatus 700 is not yet in a vacant spot available condition, user's operation becomes wasted.